//
//  Message.swift
//  TanTan
//
//  Created by 于航 on 2024/9/16.
//

import Foundation


struct Message : Identifiable {
    var id : UUID
    var content : String
    var user : User?
    var isCurrentUser : Bool {
        user == nil
    }
    
    init(id: UUID = UUID(), content: String, user: User? = nil) {
        self.id = id
        self.content = content
        self.user = user
    }
}

extension Message {
    static let messageSend = Message(content: "喵喵喵喵喵", user: nil)
    static let messageRecv = Message(content: "哈～", user: User.others)

}
